﻿using System;
using System.Collections.Generic;
using System.Text;

namespace VietKinsNutrition.Common
{
    public class SystemCls
    {
        public int LevelStart = 1;
        public int LevelEnd = 10;
        public int QestionMark = 5;
        public int NumberAnswer = 4;
        public int MaxAnswerNumber = 7;
        public int QuestionNumber = 30;
        public bool AutoDeleteAccount = true;
        public int TRINGEXAM = 30;
        public int AlertLogRecord = 10000;
        public int MaxLogRecords = 11000;
        public bool LogAccess = true;
        public int AutoSave = 60;
        public int ISCONTINUE = 0;
        public string ServerIp = "192.168.1.1";
        public int Editor = 0;
        public SystemCls(string ConnectString)
        {
            try
            {
                //this.Editor = int.Parse(SystemConfigController.GetValue(ConnectString, "Editor"));
            }
            catch { }
            try
            {
                //this.LevelStart = int.Parse(SystemConfigController.GetValue(ConnectString, "LevelStart"));
            }
            catch { }
            try
            {
                //this.LevelEnd = int.Parse(SystemConfigController.GetValue(ConnectString, "LevelEnd"));
            }
            catch { }
            try
            {
                //this.QestionMark = int.Parse(SystemConfigController.GetValue(ConnectString, "QuestionMark"));
            }
            catch { }
            try
            {
                //this.NumberAnswer = int.Parse(SystemConfigController.GetValue(ConnectString, "NumberAnswer"));
            }
            catch { }
            try
            {
                //this.MaxAnswerNumber = int.Parse(SystemConfigController.GetValue(ConnectString, "MaxAnswerNumber"));
                //if (this.MaxAnswerNumber > 9)
                //{
                //    this.MaxAnswerNumber = 9;
                //}
            }
            catch { }
            try
            {
                //this.QuestionNumber = int.Parse(SystemConfigController.GetValue(ConnectString, "QuestionNumber"));
            }
            catch { }
            try
            {
                //this.AutoDeleteAccount = Convert.ToBoolean(SystemConfigController.GetValue(ConnectString, "AutoDeleteAccount"));
            }
            catch { }
            try
            {
                //this.TRINGEXAM = int.Parse(SystemConfigController.GetValue(ConnectString, "TRINGEXAM"));
            }
            catch { }
            try
            {
                //this.AlertLogRecord = int.Parse(SystemConfigController.GetValue(ConnectString, "AlertLogRecord"));
            }
            catch { }
            try
            {
                //this.MaxLogRecords = int.Parse(SystemConfigController.GetValue(ConnectString, "MaxLogRecords"));
            }
            catch { }
            try
            {
                //this.LogAccess = Convert.ToBoolean(SystemConfigController.GetValue(ConnectString, "LogAccess"));
            }
            catch { }
            try
            {
                //this.AutoSave = int.Parse(SystemConfigController.GetValue(ConnectString, "AutoSave"));
            }
            catch { }
            try
            {
                //this.ISCONTINUE = int.Parse(SystemConfigController.GetValue(ConnectString, "ISCONTINUE"));
            }
            catch { }
            try
            {
                //this.ServerIp = SystemConfigController.GetValue(ConnectString, "ServerIp");
            }
            catch { }
        }
        public SystemCls()
        { }
    }
}
